﻿using System;

namespace NLite
{
    /// <summary>
    /// 
    /// </summary>
    public static class ExceptionService
    {
        /// <summary>
        /// 
        /// </summary>
        public static Action<Exception> ExceptionFired { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="ex"></param>
        public static void RaiseException(this Exception ex)
        {
            if (ExceptionFired != null && ex != null)
                ExceptionFired.Send(ex);
        }
    }
}